package com.yusys.jin.blog.configuration;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.web.servlet.HandlerInterceptor;

public class LoginIntercepteor implements HandlerInterceptor {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
            throws Exception {
        HttpSession session = request.getSession();
//        if (session.getAttribute("uid") == null) {
//            System.err.println("拦截器重定向了");
//            response.sendRedirect("/blog/html/index.html");
//            return false;
//        }
        return true;

    }

}
